import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  View,

} from 'react-native';
import MainNewComponent from "./myComponent/MainNewComponent";
import FetchNetDataComponent from "./myComponent/FetchNetDataComponent";
import MyTabNavigator from "./myComponent/MyTabNavigator";
import MyDrawNavigatorComponent from "./myComponent/MyDrawNavigatorComponent";

const instructions = Platform.select({
  ios: 'Press Cmd+R to reload,\n' +
    'Cmd+D or shake for dev menu',
  android: 'Double tap R on your keyboard to reload,\n' +
    'Shake or press menu button for dev menu',
});

type Props = {};
export default class App extends Component<Props> {
  constructor(Props){
    super(Props);
    this.state={
      remove:false,
    }
  }
  render() {
    // var view=this.state.remove?null:<LifecycleComponent/>;
    // var text=this.state.remove?"让他复活":"干掉他";
    // return (
    //   <View style={styles.container}>
    //       <Text style={{fontSize:30,color:'blue'}}
    //       onPress={()=>{
    //         this.setState({
    //             remove:!this.state.remove
    //         })
    //       }}>{text}</Text>
    //       {view}
    //   </View>
    // );
      return(
          <View  style={styles.container}>

              <MainNewComponent/>
              <MyDrawNavigatorComponent/>
              {/*<StackNavigatorTest />*/}
              {/*<NavigatorTest/>*/}
              {/*<MyNavigatior/>*/}
              {/*<HelloComponent/>*/}
          </View>

      );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});
